<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<html xmlns:th="http://www.thymeleaf.org">
<link rel="stylesheet" href="./css/xadmin.css">
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<head>
    <meta charset="UTF-8">
    <title>orderAddInput</title>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form action="/orderAddInput">
            <div>
                <div>
                    <label for="orderAddName" class="layui-slider-input-txt layui-inline">商品名字</label>
                    <div class="layui-form-item layui-inline">
                        <input type="text" id="orderAddName" name="orderAddName" required=""
                               autocomplete="off" class="layui-input ">
                    </div>
                    <label for="orderAddFactory" class="layui-slider-input-txt layui-inline">商品厂家</label>
                    <div class="layui-form-item layui-inline">
                        <input type="text" id="orderAddFactory" name="orderAddFactory"
                               autocomplete="off" class="layui-input ">
                    </div>
                </div>
                <div>
                    <label for="orderAddModel" class="layui-slider-input-txt layui-inline">商品规格</label>
                    <div class="layui-form-item layui-inline">
                        <input type="text" id="orderAddModel" name="orderAddModel"
                               autocomplete="off" class="layui-input ">
                    </div>
                    <label for="orderAddSpecs" class="layui-slider-input-txt layui-inline">商品型号</label>
                    <div class="layui-form-item layui-inline">
                        <input type="text" id="orderAddSpecs" name="orderAddSpecs"
                               autocomplete="off" class="layui-input ">
                    </div>
                </div>
                <div>
                    <label for="orderAddNum" class="layui-slider-input-txt layui-inline">商品数量</label>
                    <div class="layui-form-item layui-inline">
                        <input type="text" id="orderAddNum" name="orderAddNum" required=""
                               autocomplete="off" class="layui-input ">
                    </div>
                    <label for="orderAddPrice" class="layui-slider-input-txt layui-inline">商品价格</label>
                    <div class="layui-form-item layui-inline">
                        <input type="text" id="orderAddPrice" name="orderAddPrice" required=""
                               autocomplete="off" class="layui-input ">
                    </div>
                    <label for="orderAddUnit" class="layui-slider-input-txt layui-inline">商品计量单位</label>
                    <div class="layui-form-item layui-inline">
                        <input type="text" id="orderAddUnit" name="orderAddUnit" value="只"
                               autocomplete="off" class="layui-input ">
                    </div>
                </div>
                <div>
                    <label for="orderAddRemarks" class="layui-slider-input-txt layui-inline">备注</label>
                    <div class="layui-form-item layui-inline">
                        <input type="text" id="orderAddRemarks" name="orderAddRemarks"
                               autocomplete="off" class="layui-input ">
                    </div>
                </div>
                    <div>
                        <button class="layui-btn">添加</button>
                    </div>
            </div>
        </form>
        <div style="height: 50px"></div>
        <hr>
        <div class="layui-card-header">
            <div class="layui-inline">当前订单总额</div>
            <div th:text="${orderSumPrice}" class="layui-inline"></div>
        </div>

        <table border="1" class="layui-table">
            <tr class="layui-table-header">
                <td>商品id</td>
                <td>商品名字</td>
                <td>商品厂家</td>
                <td>商品规格</td>
                <td>商品型号</td>
                <td>商品数量</td>
                <td>商品价格</td>
                <td>本商品金额</td>
                <td>商品计量单位</td>
                <td>备注</td>
            </tr>
            <tr class="layui-table-body" th:each="orderAdd:${orderAdds}">
                <td th:text="${orderAdd.uid}"></td>
                <td th:text="${orderAdd.goodsName}"></td>
                <td th:text="${orderAdd.goodsFactory}"></td>
                <td th:text="${orderAdd.goodsModel}"></td>
                <td th:text="${orderAdd.goodsSpecs}"></td>
                <td th:text="${orderAdd.goodsNum}"></td>
                <td th:text="${orderAdd.goodsPrice}"></td>
                <td th:text="${orderAdd.goodsNum*orderAdd.goodsPrice}"></td>
                <td th:text="${orderAdd.goodsUnit}"></td>
                <td th:text="${orderAdd.remarks}"></td>

            </tr>
        </table>

        <form action="/orderInformationInput">
            <button class="layui-btn-lg">产品添加完成，创建订单</button>
        </form>
    </div>
</div>
</body>
</html>